/* This script locates in the playbook repo apps/microfrontends/webplay-catalog/cms/webplay-catalog.css */
/* Imports und Variablen */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary-bg: #fff;
  --text-primary: #1e1f1f;
  --text-secondary: #1e1f1f;
  --text-heading: #111827;
  --text-light: #f9fafb;
  --text-gray: #d1d5db;
  --bg-light: #fff;
  --bg-dark: #333;
  --bg-gray: #ccc;
  --transition-speed: 0.3s;
  --max-width: 1200px;
  --border-radius: 16px;
}

body {
  max-width: unset !important;
  margin: auto !important;
  background-attachment: fixed !important;
}

header {
  padding: 10px 0;
  height: 80px;
}

#webplayCatalogLogo {
  height: 100%;
  object-fit: contain;
  width: auto;
}

main {
  padding-top: 50px;
}

main .hero {
  font-size: 30px;
  color: #646464;
}

main h1 {
  font-size: 30px;
  color: #e13a3c;
  font-weight: 700;
  padding: 17px 0;
}

main .descr {
  width: 70%;
  margin-bottom: 20px;
}

/* Light Mode Background */
body {
  max-width: var(--max-width);
  margin: 0 auto;
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  min-height: 100dvh;
  color: var(--text-primary);
  background-color: var(--primary-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  transition: background-color var(--transition-speed) ease;
  overflow: auto;
  background-image: linear-gradient(to bottom, rgba(129, 126, 126, 0.45), rgba(255, 255, 255, 0)) !important;
}

body.web-catalog-no-bg,
.dark body.web-catalog-no-bg {
  background: transparent !important;
}

.dark body {
  background-image: linear-gradient(to bottom, rgba(98, 98, 98, 0.558), rgb(44, 44, 44)) !important;
}

#webplayCatalogRoot {
  width: 100%;
}

#webplayCatalogRoot * {
  all: revert-layer;
}

.wrapper {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  align-items: stretch;
  margin-top: 0;
  min-height: 800px;
  padding: 0 20px;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.content-box {
  display: none;
  padding: 16px;
  border-radius: var(--border-radius);
  margin: 8px;
  width: 100%;
  margin-top: 24px;
  overflow: auto;
}

.app-box {
  width: 100%;
  height: 100%;
  padding: 16px;
  border-radius: var(--border-radius);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3E%3Cpath fill='none' stroke='%23333' stroke-width='8' stroke-linecap='round' d='M25,4 A21,21 0 0,1 46,25' opacity='0.8'%3E%3CanimateTransform attributeName='transform' attributeType='XML' type='rotate' from='0 25 25' to='360 25 25' dur='1s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.89);
  background-size: 50px 50px;
  margin-top: 36px;
  margin-right: 16px;
}

.app-box iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Typografie */
.logo {
  width: 160px;
  height: auto;
}

.headline {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  margin-top: 24px;
}

.body-text {
  font-size: 1.125rem;
  line-height: 1.75;
  margin-bottom: 2rem;
}

/* Theme Switch */
.theme-switch-wrapper {
  position: absolute;
  top: 7px;
  right: 15px;
}

.theme-switch {
  display: inline-block;
  height: 24px;
  width: 44px;
  position: relative;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: var(--bg-gray);
  position: absolute;
  inset: 0;
  cursor: pointer;
  transition: var(--transition-speed);
  height: 24px;
}

.slider:before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--bg-light);
  transition: var(--transition-speed);
  z-index: 2;
}

.slider.round,
.slider.round:before {
  border-radius: 34px;
}

/* Theme Icons */
.sun,
.moon {
  position: absolute;
  top: 6px;
  z-index: 3;
  stroke-width: 2px;
  stroke: #666;
  transition: var(--transition-speed);
}

.sun {
  left: 6px;
}

.moon {
  right: 6px;
}

/* Dark Mode Background */
body.dark-mode {
  color: var(--text-light);
  background-color: var(--bg-dark);
  background-image: linear-gradient(to bottom, rgba(32, 35, 42, 0.95), rgba(17, 24, 39, 0.3));
}

body.dark-mode .app-box {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='8' stroke-linecap='round' d='M25,4 A21,21 0 0,1 46,25' opacity='0.8'%3E%3CanimateTransform attributeName='transform' attributeType='XML' type='rotate' from='0 25 25' to='360 25 25' dur='1s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
  background-color: rgb(21 21 21 / 1);
}

/* Theme Switch States */
input:checked + .slider {
  background-color: #afafaf;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

input:checked + .slider .sun {
  opacity: 0;
}

input:checked + .slider .moon {
  opacity: 1;
}

input:not(:checked) + .slider .sun {
  opacity: 1;
}

input:not(:checked) + .slider .moon {
  opacity: 0;
}

/* Responsive Design */
@media (min-width: 768px) {
  .content-box {
    display: block;
    width: 50%;
  }

  .app-box {
    width: 50%;
    padding: 16px;
  }
}

@media (max-width: 768px) {
  .headline {
    font-size: 2.5rem;
  }

  .body-text {
    font-size: 1rem;
  }

  .app-box {
    padding: 0px;
    border-radius: 0px;
    margin: 0px;
  }

  .wrapper {
    height: 100dvh;
    min-height: auto;
  }
}